package com.jiazhong.basic.pack0718;

public class Person {

    // 四个属性
    private int id;
    public String name;
    public Character gender;
    private String birthday;

    public Person() {
        System.out.println("无参数构造方法");
    }

    private Person(int id, String name, Character gender, String birthday) {
        this.id = id;
        this.name = name;
        this.gender = gender;
        this.birthday = birthday;
        System.out.println("全参数构造方法");
    }

    public Person(String name, Character gender) {
        this.name = name;
        this.gender = gender;
        System.out.println("两个参数的构造方法");
    }

    public void eat() {
        System.out.println(name + "吃饭呢");
    }

    private void sleep() {
        System.out.println(name + "准备睡觉了");
    }

    public String getBirthday() {
        return name + "的生日是：" + birthday;
    }
}
